<!DOCTYPE html>
<html>
<head>
    <title>异常跟踪记录</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("exceprecord:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="excepRecord" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="设备名称" prop="devName" icon="md-arrow-dropdown-circle" @on-click="getDeviceInfo" readonly>
                        <i-input v-model="excepRecord.devName" placeholder="设备名称"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="设备编码" prop="devCode">
                        <i-input v-model="excepRecord.devCode" placeholder="设备编码" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="车间" prop="workshopName">
                        <i-input v-model="excepRecord.workshopName" placeholder="车间" readonly></i-input>
                    </Form-item>

                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="生产线" prop="proLineName">
                        <i-input v-model="excepRecord.proLineName" placeholder="生产线" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="状态" prop="status">
<!--                        <i-input v-model="excepRecord.status" placeholder="状态"></i-input>-->
                        <i-select v-model="excepRecord.status" placeholder="状态">
                            <i-option v-for="item in exceptStatus" :value="item.value" :key="item.value">{{item.name}}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="异常来源 " prop="exType">
                        <Radio-group v-model="excepRecord.exType">
                            <Radio :label="0"><span>巡检异常</span></Radio>
                            <Radio :label="1"><span>维修异常</span></Radio>
                        </Radio-group>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="责任人" prop="dutyUserName">
                        <i-input v-model="excepRecord.dutyUserName" placeholder="责任人"></i-input>
                    </Form-item>
                </i-col>

            </Row>

            <Row>
                <i-col span="11">
                    <Form-item label="异常现象" prop="excepCon">
                        <i-input type="textarea" v-model="excepRecord.excepCon" placeholder="异常现象"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11"offset="1">
                    <Form-item label="建议" prop="advice">
                        <i-input type="textarea" v-model="excepRecord.advice" placeholder="建议"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="问题描述" prop="excepDescr">
                        <i-input type="textarea" v-model="excepRecord.excepDescr" placeholder="问题描述"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11"offset="1">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="excepRecord.remark" placeholder="备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <!--            <i-col span="11">
                            <Form-item label="所属巡检记录" prop="inspectionRecords">
                                <i-input v-model="excepRecord.inspectionRecords" placeholder="所属巡检记录"></i-input>
                            </Form-item>
                        </i-col>
                        <i-col span="11">
                            <Form-item label="修改人员" prop="updateUser">
                                <i-input v-model="excepRecord.updateUser" placeholder="修改人员"></i-input>
                            </Form-item>
                        </i-col>
                        </Row>
                        <Row>
                            <i-col span="11">
                                <Form-item label="修改时间" prop="updateDate">
                                    <i-input v-model="excepRecord.updateDate" placeholder="修改时间"></i-input>
                                </Form-item>
                            </i-col>
                            <i-col span="11">
                                <Form-item label="添加人员" prop="createUser">
                                    <i-input v-model="excepRecord.createUser" placeholder="添加人员"></i-input>
                                </Form-item>
                            </i-col>
                        </Row>
                        <Row>
                            <i-col span="11">
                                <Form-item label="添加时间" prop="createDate">
                                    <i-input v-model="excepRecord.createDate" placeholder="添加时间"></i-input>
                                </Form-item>
                            </i-col>
                        </Row>-->
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/device/exceprecord.js?_${date.systemTime}"></script>
</body>
</html>
